C语言调用rust编译的静态库--cbindgen方式
在 C 代码中调用 Rust 代码,需要我们将 Rust 源代码打包为静态库文件。在 C 代码编译时,链接进去。 1、创建静态库 1.1、在命令行使用 cargo init --lib mylog ...
在 C 代码中调用 Rust 代码,需要我们将 Rust 源代码打包为静态库文件。在 C 代码编译时,链接进去。 1、创建静态库 1.1、在命令行使用 cargo init --lib mylog ...